import { request } from '../utils/request';
const getJobList = async (params: any) => {
  return await request.get('/job/pagination', params);
};
const GetJobByDepartmentId = async (depId: number) => {
  return await request.get('/job/getJobByDepartmentId', { depId: depId });
};

const getJobDetail = async (id: number) => {
  return await request.get('/job/detail?id=' + id);
};

const addJob = async (params: any) => {
  return await request.post('/job/add', params);
};

const updateJob = async (params: any) => {
  return await request.post('/job/update', params);
};

const deleteJob = async (id: Number) => {
  return await request.post('/job/delete', { id: id });
};

export {
  getJobDetail,
  getJobList,
  addJob,
  updateJob,
  deleteJob,
  GetJobByDepartmentId,
};
